/**
 * Apr 2, 2011
 * 9:10:09 PM
 * Timiz
 * kukujun@gmail.com
 *cn.lastjune.service.impltimiz-project-dpDomaindeptServiceImpl
 */
package cn.lastjune.service.impl;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.lastjune.dao.DomaindeptDao;
import cn.lastjune.pojo.Domaindept;
import cn.lastjune.service.DomaindeptService;
import cn.lastjune.util.Page;

/**
 * @author Timiz
 *         kukujun@gmail.com
 */
@Service
@Transactional
public class DomaindeptServiceImpl implements DomaindeptService
{
    @Autowired
    DomaindeptDao dao;

    @Override
    public Page<Domaindept> getAll(Page<Domaindept> page)
    {

        return dao.getPageAll(page);
    }

    @Override
    public Domaindept getDomaindeptById(BigDecimal id)
    {

        return dao.getByID(id);
    }

    @Override
    public void insertDomaindept(Domaindept entity)
    {
        dao.add(entity);
    }

    @Override
    public void deleteDomaindept(BigDecimal id)
    {
        dao.delete(id);
    }

    @Override
    public void updateDomaindept(Domaindept entity)
    {
        dao.update(entity);
    }

}
